package com.hy.mydesktop.shared.persistence.domain.gxt;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import javax.persistence.Transient;

import net.sf.gilead.annotations.ServerOnly;
import net.sf.gilead.pojo.base.ILightEntity;

import com.extjs.gxt.ui.client.data.BaseModel;
import com.extjs.gxt.ui.client.data.ChangeEvent;
import com.extjs.gxt.ui.client.data.ChangeListener;
import com.extjs.gxt.ui.client.data.Model;

public class MyGxtBaseModelWithGilead extends BaseModel implements ILightEntity{

	public MyGxtBaseModelWithGilead() {
		super();
		// TODO Auto-generated constructor stub
	}

	public MyGxtBaseModelWithGilead(Map<String, Object> properties) {
		super(properties);
		// TODO Auto-generated constructor stub
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 3763928424460879811L;
	@Override
	public <X> X get(String property) {
		// TODO Auto-generated method stub
		return super.get(property);
	}

	@Override
	public <X> X get(String property, X valueWhenNull) {
		// TODO Auto-generated method stub
		return super.get(property, valueWhenNull);
	}

	@ServerOnly
	@Override
	public Map<String, Object> getProperties() {
		// TODO Auto-generated method stub
		return super.getProperties();
	}

	@ServerOnly
	@Override
	public Collection<String> getPropertyNames() {
		// TODO Auto-generated method stub
		return super.getPropertyNames();
	}

	@Override
	public void addChangeListener(ChangeListener... listener) {
		// TODO Auto-generated method stub
		super.addChangeListener(listener);
	}

	@Override
	public void addChangeListener(List<ChangeListener> listeners) {
		// TODO Auto-generated method stub
		super.addChangeListener(listeners);
	}

	@Override
	public boolean isSilent() {
		// TODO Auto-generated method stub
		return super.isSilent();
	}

	@Override
	public void notify(ChangeEvent evt) {
		// TODO Auto-generated method stub
		super.notify(evt);
	}

	@Override
	public <X> X remove(String name) {
		// TODO Auto-generated method stub
		return super.remove(name);
	}

	@Override
	public void removeChangeListener(ChangeListener... listener) {
		// TODO Auto-generated method stub
		super.removeChangeListener(listener);
	}

	@Override
	public void removeChangeListeners() {
		// TODO Auto-generated method stub
		super.removeChangeListeners();
	}

	@Override
	public <X> X set(String name, X value) {
		// TODO Auto-generated method stub
		return super.set(name, value);
	}

	@Override
	public void setSilent(boolean silent) {
		// TODO Auto-generated method stub
		super.setSilent(silent);
	}

	@Override
	protected void fireEvent(int type) {
		// TODO Auto-generated method stub
		super.fireEvent(type);
	}

	@Override
	protected void fireEvent(int type, Model item) {
		// TODO Auto-generated method stub
		super.fireEvent(type, item);
	}

	@Override
	protected void notifyPropertyChanged(String name, Object value,
			Object oldValue) {
		// TODO Auto-generated method stub
		super.notifyPropertyChanged(name, value, oldValue);
	}
	//////////////////////////////////////////////////////////////////
	////以下，是对于Gilead的实现
	//////////////////////////////////////////////////////////////////
	
	MyGileadLightEntity lightEntity = new MyGileadLightEntity();
	@Override
	public void addProxyInformation(String property, Object proxyInfo) {
		// TODO Auto-generated method stub
		lightEntity.addProxyInformation(property, proxyInfo);
	}

	@Override
	public void removeProxyInformation(String property) {
		// TODO Auto-generated method stub
		lightEntity.removeProxyInformation(property);
	}

	@Transient
	@Override
	public Object getProxyInformation(String property) {
		// TODO Auto-generated method stub
		return lightEntity.getProxyInformation(property);
	}

	@Transient
	@Override
	public String getDebugString() {
		// TODO Auto-generated method stub
		return lightEntity.getDebugString();
	}

	@Override
	public boolean isInitialized(String property) {
		// TODO Auto-generated method stub
		return lightEntity.isInitialized(property);
	}

	@Override
	public void setInitialized(String property, boolean initialized) {
		// TODO Auto-generated method stub
		lightEntity.setInitialized(property, initialized);
	}

	@Transient
	@Override
	public Object getUnderlyingValue() {
		// TODO Auto-generated method stub
		return lightEntity.getUnderlyingValue();
	}
}
